package archer.framework.client.config;


import java.util.List;

/**
 * 远程调用配置
 *
 * @author christ
 * @date 2015/8/11
 */
public class RemoteInvokeConfig {

    /**
     * api前缀掩码
     */
    private String mask;

    /**
     * current host
     */
    private String host;

    /**
     * host list
     */
    private List<String> hosts;

    /**
     * api版本
     */
    private String version;

    /**
     * apikey
     */
    private String apikey;

    /**
     * apisecret
     */
    private String apisecret;

    /**
     * 含登录的url，在调用这些接口的时候会自动将token放入cookie中，多个url以逗号隔开
     */
    private String loginUrl;

    /**
     * 请求timeout
     */
    private int timeout;

    private int retry = 0;

    public String getHost() {
        return host;
    }

    public RemoteInvokeConfig setHost(String host) {
        this.host = host;
        return this;
    }

    public String getApikey() {
        return apikey;
    }

    public void setApikey(String apikey) {
        this.apikey = apikey;
    }

    public String getMask() {
        return mask;
    }

    public RemoteInvokeConfig setMask(String mask) {
        this.mask = mask;
        return this;
    }

    public String getVersion() {
        return version;
    }

    public RemoteInvokeConfig setVersion(String version) {
        this.version = version;
        return this;
    }

    public String getApisecret() {
        return apisecret;
    }

    public RemoteInvokeConfig setApisecret(String apisecret) {
        this.apisecret = apisecret;
        return this;
    }

    public String getLoginUrl() {
        return loginUrl;
    }

    public RemoteInvokeConfig setLoginUrl(String loginUrl) {
        this.loginUrl = loginUrl;
        return this;
    }

    public List<String> getHosts() {
        return hosts;
    }

    public RemoteInvokeConfig setHosts(List<String> hosts) {
        this.hosts = hosts;
        return this;
    }

    public int getRetry() {
        return retry;
    }

    public RemoteInvokeConfig setRetry(int retry) {
        this.retry = retry;
        return this;
    }

    public int getTimeout() {
        return timeout;
    }

    public RemoteInvokeConfig setTimeout(int timeout) {
        this.timeout = timeout;
        return this;
    }
}
